package com.jy.rhin.infra.repo.notfication.subscribe.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jy.rhin.domain.notification.subscribe.entity.vo.SubscribeTopicFilterVO;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Description: 主题订阅过滤条件信息
 * @Author: lww
 * @Date: 2022/6/29
 */
@Data
@TableName("t_notification_subscribe_filter")
@NoArgsConstructor
public class SubscribeTopicFilterPO {

    public SubscribeTopicFilterPO(SubscribeTopicFilterVO filterVo, Long filterId, Long subscribeId) {
        this.id = filterId;
        this.subscribeId = subscribeId;
        this.queryFilterExp = filterVo.getQueryFilterExp();
        this.queryFilterValue = filterVo.getQueryFilterValue();
    }

    @TableId
    private Long id;
    /**
     * 主题订阅信息id
     */
    @TableField("subscribe_id")
    private Long subscribeId;
    /**
     * 预存查询过滤条件表达式
     */
    @TableField("query_filter_exp")
    private String queryFilterExp;
    /**
     * 预存查询过滤条件取值
     */
    @TableField("query_filter_value")
    private String queryFilterValue;


}
